﻿<%@ Assembly Name="RealDolmen.SharePoint.ListFeatures.EmailThisFile, Version=1.0.0.0, Culture=neutral, PublicKeyToken=efb8734f6a27ce6f"%> 
<%@ Assembly Name="RealDolmen.SharePoint.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7f5c307c491a8188"%> 
<%@ Page Language="C#" Title="Send file as an e-mail" Inherits="RealDolmen.SharePoint.ListFeatures.EmailThisFile.SendEmail" MasterPageFile="~/_layouts/dialog.master"%>

<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %>
<%@ Import Namespace="Microsoft.SharePoint.WebControls" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 

<asp:Content ID="Content5" contentplaceholderid="PlaceHolderDialogHeaderPageTitle" runat="server">
	E-mail <asp:Literal ID="litFileName" runat="server" />
</asp:Content>

<asp:Content ID="Content4" contentplaceholderid="PlaceHolderHelpLink" runat="server">
</asp:Content>

<asp:Content ID="Content6" contentplaceholderid="PlaceHolderDialogBodyHeaderSection" runat="server">
</asp:Content>

<asp:Content ID="Content3" contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server" >
	<SharePoint:ScriptLink ID="ScriptLink1" language="javascript" name="owsbrows.js" runat="server" />
	<SharePoint:ScriptLink ID="ScriptLink2" language="javascript" name="core.js" runat="server" />
	<SharePoint:CustomJSUrl ID="CustomJSUrl1" runat="server" />
	<SharePoint:CssRegistration ID="CssRegistration1" name="core.css" runat="server" />
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderDialogDescription" runat="server">
<span style="color:red;font-size:10pt; font-weight: bold; font-family: Tahoma;"><asp:Literal ID="litError" runat="server" /></span>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderId="PlaceHolderDialogBodyMainSection" runat="server">
    <TABLE border="0" cellspacing="0" cellpadding="0" width="100%">	 
	    <wssuc:InputFormSection Title="E-mail recipient" runat="server">
		    <Template_Description>
			    The recipient of the selected file
		    </Template_Description>
		    <Template_InputFormControls>
			    <asp:TextBox ID="txtRecipient" runat="server" CssClass="ms-long" Width="250px" /><br />
			    <span style="color: Red"><asp:Literal ID="litRecipient" runat="server" /></span>
		    </Template_InputFormControls>
        </wssuc:InputFormSection> 
	    <wssuc:InputFormSection Title="E-mail sender" runat="server">
		    <Template_Description>
			    The sender of the e-mail
		    </Template_Description>
		    <Template_InputFormControls>
			    <asp:TextBox ID="txtSender" runat="server" Enabled="false" CssClass="ms-long" Width="250px" /><br />
			    <span style="color: Red"><asp:Literal ID="litSender" runat="server" /></span>
		    </Template_InputFormControls>
        </wssuc:InputFormSection> 
        
        <wssuc:InputFormSection Title="Subject" runat="server">
		    <Template_Description>
			    The subject of the e-mail
		    </Template_Description>
		    <Template_InputFormControls>
			    <asp:TextBox ID="txtSubject" runat="server" CssClass="ms-long" Width="250px" />
		    </Template_InputFormControls>
        </wssuc:InputFormSection>
        
        <wssuc:InputFormSection Title="Body" runat="server">
		    <Template_Description>
			    The body of the e-mail
		    </Template_Description>
		    <Template_InputFormControls>
			    <asp:TextBox TextMode="multiline" ID="txtBody" runat="server" CssClass="ms-long" Width="250px" Height="150px" /><br />
			    <%=string.Format("<img src=\"/_layouts/images/{0}\" />", Microsoft.SharePoint.SPContext.Current.ListItem.File.IconUrl)%>
			    <%= String.Format("<a style=\"font-family: tahoma; font-size: 8pt;\" href=\"{1}\" target=\"_blank\">{0}</a>", Microsoft.SharePoint.SPContext.Current.File.Name, Microsoft.SharePoint.SPContext.Current.File.ServerRelativeUrl)%>
			    (<%= RealDolmen.Helpers.CapacityFormatter.FormatBytes(Microsoft.SharePoint.SPContext.Current.File.TotalLength)%>)
		    </Template_InputFormControls>
        </wssuc:InputFormSection>
          	     
    </table>
</asp:Content>